package org.wejob.core.log;

public class MessageRecord<K,V> {
    private final String topic;
    private final K key;
    private final V value;
    private final Long timestamp;
    Thread resultWaiter;
    //LinkedList<Thread> waiters;//这里不能直接记录生产者线程;有可能future是由别的线程处理的;
    Callback callback;
    int type;
    Topic t;
    long offset;
    boolean commited=false;
    ProduceFuture future;

    public MessageRecord(String topic,  K key, V value, Long timestamp) {
        this.topic = topic;
        this.key = key;
        this.value = value;
        this.timestamp = timestamp;
    }
    public V message(){
        return this.value;
    }
    public void setOffset(long val){
        this.offset=val;
    }
    public long offset(){
        return this.offset;
    }
}
